package com.example;

import java.time.LocalDate;

public class Semester {
    private int id;
    private String name;
    private LocalDate startDate;
    private LocalDate endDate;
    private String status; // 例如：未开始、进行中、已结束

    public Semester(int id, String name, LocalDate startDate, LocalDate endDate, String status) {
        this.id = id;
        this.name = name;
        this.startDate = startDate;
        this.endDate = endDate;
        this.status = status;
    }

    // Getters
    public int getId() { return id; }
    public String getName() { return name; }
    public LocalDate getStartDate() { return startDate; }
    public LocalDate getEndDate() { return endDate; }
    public String getStatus() { return status; }

    // Setters
    public void setId(int id) { this.id = id; }
    public void setName(String name) { this.name = name; }
    public void setStartDate(LocalDate startDate) { this.startDate = startDate; }
    public void setEndDate(LocalDate endDate) { this.endDate = endDate; }
    public void setStatus(String status) { this.status = status; }

    @Override
    public String toString() {
        return name;
    }
} 